package systems.database.query.columns;

/**
 * Provides mechanism for the 'ORDER BY' part.
 * @author Baptiste Legrand & Benjamin Orman
 */

public class ColumnOrder {
	private ColumnItf column;
	private ColumnsOrderEnum order;
	
	/**
	 * This constructor provides a method to create an Order By clause.<br/>
	 * As there is no order defines, the ASC order will be set.
	 * @param column
	 */
	public ColumnOrder(ColumnItf column)
	{
		this.setColumn(column);
		this.setOrder(ColumnsOrderEnum.ASC);
	}
	
	public ColumnOrder(ColumnItf column, ColumnsOrderEnum order)
	{
		this.setColumn(column);
		this.setOrder(order);
	}

	public void setColumn(ColumnItf column) {
		this.column = column;
	}

	public ColumnItf getColumn() {
		return column;
	}

	public void setOrder(ColumnsOrderEnum order) {
		this.order = order;
	}

	public ColumnsOrderEnum getOrder() {
		return order;
	}
}
